package com.hunk.core.json.base;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;



/** Description:<br>
 * @author Hunk
 * @since 2013-4-3
 * @param <T>
 */
@JsonAutoDetect
public class JsonRequest<T> {
	@JsonProperty
	String hand;
	@JsonProperty
	String methodName;
	@JsonProperty
	T req;
	@JsonProperty
	public String username;
	@JsonProperty
	public String password;

	public JsonRequest() {
		super();
		// TODO Auto-generated constructor stub
	}
	public JsonRequest(String methodName, T req) {
		super();
		this.methodName = methodName;
		this.req = req;
	}
	public String getMethodName() {
		return methodName;
	}	
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	public T getReq() {
		return req;
	}
	public void setReq(T req) {
		this.req = req;
	}
	public String getHand() {
		return hand;
	}
	public void setHand(String hand) {
		this.hand = hand;
	}
	@Override
	public String toString() {
		return "JsonRequest [methodName=" + methodName + ", req=" + req + "]";
	}
}